package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.vo.zbg.User;
import com.ruoyi.system.domain.zbg.AnnualCostData;
import com.ruoyi.system.mapper.AnnualCostDataMapper;
import com.ruoyi.system.mapper.UserMapper;
import com.ruoyi.system.service.AnnualCostDataService;
import com.ruoyi.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User validateUser(String username, String password) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<User>().eq("phone", username);
        User user = userMapper.selectOne(queryWrapper);
      return user;

    }
}
